package com.gzhryc.shared_device.oem.code.profit.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.DateBranchTable;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.enums.DateBranchTableType;
import com.gzhryc.shared_device.base.enums.WalletOperateEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 项目钱包操作
 * @author ty 2020年9月14日
 *
 */
@DateBranchTable(type = DateBranchTableType.month)
@Table(name = "project_wallet_operate")
public class ProjectWalletOperate implements Serializable{

	private static final long serialVersionUID = 1L;

	@Id
	protected Long id;
	
	@Column(name = "wallet_id", notNull = true,note = "钱包类型")
	protected Integer walletId;

	@Column(name = "account_group_id", notNull = true, note = "账号组ID")
	protected Long accountGroupId;

	@Column
	protected Long money; // 操作的金额
	
	@Column
	protected Integer type; // 操作类型，增加或减少
	
	@Column(name = "operate_note")
	protected String operateNote; // 操作说明
	
	@Column(name = "operate_date")
	protected Date operateDate; // 操作时间

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getWalletId() {
		return walletId;
	}

	public void setWalletId(Integer walletId) {
		this.walletId = walletId;
	}

	public Long getAccountGroupId() {
		return accountGroupId;
	}

	public void setAccountGroupId(Long accountGroupId) {
		this.accountGroupId = accountGroupId;
	}

	public Long getMoney() {
		return money;
	}

	public void setMoney(Long money) {
		this.money = money;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getOperateNote() {
		return operateNote;
	}

	public void setOperateNote(String operateNote) {
		this.operateNote = operateNote;
	}

	public Date getOperateDate() {
		return operateDate;
	}

	public void setOperateDate(Date operateDate) {
		this.operateDate = operateDate;
	}

	public String getTypeName() {
		return WalletOperateEnum.Type.note(this.type);
	}

	public String getMoneyStr() {
		return NumberTools.getMoneyLiStr(this.money);
	}
}
